package sk.stuba.fiit.clientApp.singeltons;

import java.io.File;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * 
 * @author Marek Hruska
 * Singelton for Application Context
 * 
 */
public class ApplicationContextSingelton {
	
	private static ApplicationContext context = null;
	
	private ApplicationContextSingelton(){}
	
	public static synchronized ApplicationContext getInstance() {
        if (context == null) {
        		File f = new File("");
        		context = new ClassPathXmlApplicationContext("spring-context.xml");
        }
        return context;
	}
}
